Home:ALL Converter>how to select empty fields inside mysql at specific condition?

how to select empty fields inside mysql at specific condition?

Ask Time:2017-12-01T21:41:41         Author:reza hornet

Json Formatter

I have this table in mysql

id |   chat_id   |   name  | grade | photo | phone
-------------------------------------------
1  |   1344564   |  mikel  |       |       |

so I want to select all empty fields(grade,photo,phone) in a single code line at specific condition

Author:reza hornet,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/47594705/how-to-select-empty-fields-inside-mysql-at-specific-condition
Aasif khan :

SELECT * FROM exampletable WHERE chat_id="1344564" AND (grade IS NULL) OR (photo IS NULL) OR (phone IS NULL)",
2017-12-01T14:19:47
Amit Gupta :

You can update grade, photo and phone in your query like below:\n\nAND (grade = \"\" OR grade IS NULL)\n",
2017-12-01T13:51:17
yy